package com.demo.sys.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * <p>系统页面视图</p>
 *@author zwy
 *@date 2023/8/12 20:22
*/
@Controller
public class SysPageController {
    @RequestMapping("sys/{url}.html" )
    public String module(@PathVariable("url" ) String url) {
        return "sys/" + url;
    }

    @RequestMapping("sys/{module}/{url}.html" )
    public String module1(@PathVariable("module" ) String module, @PathVariable("url" ) String url) {
        return "sys/" + module + "/" + url;
    }

    @RequestMapping("sys/{module}/{module1}/{url}.html" )
    public String module2(@PathVariable("module" ) String module, @PathVariable("module1" ) String module1, @PathVariable("url" ) String url) {
        return "sys/" + module + "/" + module1 + "/" + url;
    }

    @RequestMapping(value = {"/", "index.html"})
    public String index() {
        return "index";
    }

    @RequestMapping("index1.html" )
    public String index1() {
        return "index";
    }

    @RequestMapping("login.html" )
    public String login() {
        System.out.println("进入里面");
        return "login";
    }

    @RequestMapping("login2.html" )
    public String login2() {
        return "login2";
    }

    @RequestMapping("main.html" )
    public String main() {
        return "main";
    }

    @RequestMapping("404.html" )
    public String notFound() {
        return "404";
    }
}
